<?php
/**
 *  💡 免责声明：本软件不得用于商业用途，仅做学习交流
 *  ⚠️ 权利声明：本软件由版权人提供产品技术支持
 *  📅 项目编号：NX2025-0135
 */
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreatePointPriceHistoriesTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('point_price_histories', function (Blueprint $table) {
            $table->id();
            $table->decimal('price', 18, 6)->default(0)->comment('当前积分价格');
            $table->decimal('total_pool_amount', 18, 6)->default(0)->comment('红池总金额');
            $table->decimal('total_member_points', 18, 6)->default(0)->comment('会员总积分');
            $table->timestamps();
        });
        \Illuminate\Support\Facades\DB::statement("ALTER TABLE `point_price_histories` comment '积分价格记录'");
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('point_price_histories');
    }
}
